package com.wzx.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzx.user.dto.RelationDto;
import com.wzx.user.pojo.Group;
import com.wzx.user.pojo.Relation;
import com.wzx.user.vo.GroupAddAdmin;
import com.wzx.user.vo.RelationVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author wzx
 * @version 1.0
 * @date 2022/7/26 - 18:58
 * @description 标题
 */
@Mapper
public interface RelationMapper extends BaseMapper<Relation> {
    List<RelationDto> getRelationList(@Param("userId") Integer userId, @Param("relationType") Integer reLtiaonType);

    List<RelationDto> getRelationListByFs(@Param("userId") Integer userId);

    List<RelationDto> getRelationListByGroup(Integer userId);

    List<RelationDto> selectByUserId(Integer userId);

    void changeState(Relation relation);

    void updateFriendRemarks(Relation relation);

    void changeUsersAdmin(GroupAddAdmin groupAddAdmin);

    void deleteByIds(Integer groupId, Integer[] userIds);

    List<RelationDto> getRelationListByBlack(Integer userId);

    List<RelationDto> getRelationListBySearch(RelationVo relationVo);

    List<Group> selectAddGroupList(Integer userId);
}
